import request from '@/utils/request'

// 获取年级下的班级列表
export const getClassList = (params) => {
  return request.get('/class/list', { params })
}

// 新增班级
export const addClass = (data) => {
  return request.post('/class/add', data)
}

// 编辑班级
export const editClass = (data) => {
  return request.put('/class/edit', data)
}

// 删除班级
export const deleteClass = (id) => {
  return request.delete(`/class/delete/${id}`)
}

// 检查班级是否有学生
export const checkClassHasStudent = (classId) => {
  return request.get('/class/check', { params: { classId } })
}